package com.springCloud.service;

import com.springCloud.StaticClass;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@Slf4j
public class OrderService {
	
	@Autowired
	private RestTemplate template;
	
	@Value("server.port")
	private String serverProt;

	@RequestMapping("/getOrder")
	public String getOrder() {
		String result = template.getForObject(StaticClass.MEMBER_URL, String.class);
		log.info(result);
		return result;
	}
	@RequestMapping("/index")
	public String index() {
		return "我是index";
	}
	
	

}
